From: Maximilian Engelhardt Date: Thu, 26 Jan 2023 21:06:50 +0000 (+0100) Subject: d/rules: use pkg-info.mk and do Maintainer parsing in d/rules X-Git-Tag: archive/raspbian/4.17.1+2-gb773c48e36-1+rpi1~1^2~42 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=2421d30550cdf0185fbb61e2f97907a627efb885;p=xen.git d/rules: use pkg-info.mk and do Maintainer parsing in d/rules Use DEB_VERSION and DEB_VERSION_UPSTREAM from /usr/share/dpkg/pkg-info.mk as suggested by lintian. This fixes 'debian-rules-parses-dpkg-parsechangelog' in the lintian output. Also move parsing of the Maintainer field in debian/control from our delta queue to debian/rules and use the newly available DEB_VERSION in the delta queue. Signed-off-by: Maximilian Engelhardt --- diff --git a/debian/rules b/debian/rules index dd94e3d4db..3046084978 100755 --- a/debian/rules +++ b/debian/rules @@ -5,10 +5,12 @@ SHELL := bash -e -# SOURCE_BASE_DIR is used by our delta queue to find the top directory. It -# seems this information is currenty not directly provided by the Debian build -# system. -export SOURCE_BASE_DIR=$(shell pwd) +# This gives us DEB_VERSION_UPSTREAM and DEB_VERSION (used by our delta queue) +include /usr/share/dpkg/pkg-info.mk +export DEB_VERSION + +# DEB_MAINTAINER is used by our delta queue +export DEB_MAINTAINER := $(shell sed -ne 's/^Maintainer: \(.*\)$$/\1/p' debian/control) # This influences dpkg-buildflags to specify better linker # options. See https://wiki.debian.org/Hardening @@ -68,7 +70,7 @@ flavour=$(flavour_$(DEB_HOST_ARCH)) # (Everywhere else, it is handled dynamically.) # upstream_version := \ - $(shell dpkg-parsechangelog -SVersion | sed 's/\(\.[0-9]*\)\..*/\1/' ) + $(shell echo $(DEB_VERSION_UPSTREAM) | sed 's/\(\.[0-9]*\)\..*/\1/' ) # Many of the debhelper files are most conveniently provided as # templates which depend on the flavour and the upstream version.